package com.kmxd.ams.client.archive;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kmxd.ams.client.archive.dto.ArchiveRuleFieldAddDTO;
import com.kmxd.ams.client.archive.dto.ArchiveRuleFieldEditDTO;
import com.kmxd.ams.client.archive.dto.ArchiveRuleFieldQueryDTO;
import com.kmxd.ams.client.archive.vo.ArchiveRuleFieldListVO;
import com.kmxd.ams.client.archive.vo.ArchiveRuleFieldVO;
import com.kmxd.ams.infra.archive.entity.ArchiveRuleField;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 整理规则-规则字段 服务类
 *
 * @author nickbi
 * @since 2022-07-30
 */
public interface IArchiveRuleFieldSvc extends IService<ArchiveRuleField> {

  /**
   * 分页查询
   *
   * @param reqPage
   * @param req
   * @return
   */
  Page<ArchiveRuleFieldListVO> selectPage(Page reqPage, ArchiveRuleFieldQueryDTO req);

  /**
   * 查询列表
   *
   * @param req
   * @return
   */
  List<ArchiveRuleFieldListVO> selectList(ArchiveRuleFieldQueryDTO req);

  /**
   * 新增
   *
   * @param req
   */
  void add(ArchiveRuleFieldAddDTO req);

  /**
   * 修改
   *
   * @param req
   */
  void edit(ArchiveRuleFieldEditDTO req);

  /**
   * 删除
   *
   * @param ids
   */
  void remove(String ids);

  /**
   * 查看
   *
   * @param id
   * @return
   */
  ArchiveRuleFieldVO view(Long id);

    @Transactional(rollbackFor = Exception.class)
    @CacheEvict(allEntries = true)
    void changeSort(String ids);
}
